package cn.ztuo.bitrade.job;

import cn.ztuo.bitrade.service.ContractService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class RobotJob {

@Autowired
private ContractService contractService;
    /**
     * 所有合约利率（1000 可用）
     * 每1分钟计算一次合约利率
     */
    @Scheduled(fixedRate = 2*1000)
    public void contractInterestRate() {

        contractService.robotAddOrder(null);
    }


}
